package com.ruoyi.project.viewin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.viewin.mapper.ViewInJobDetailMapper;
import com.ruoyi.project.viewin.domain.ViewInJobDetail;
import com.ruoyi.project.viewin.service.IViewInJobDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 入库子明细Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-13
 */
@Service
public class ViewInJobDetailServiceImpl implements IViewInJobDetailService
{
    @Autowired
    private ViewInJobDetailMapper viewInJobDetailMapper;

    /**
     * 查询入库子明细
     *
     * @param taskNo 入库子明细主键
     * @return 入库子明细
     */
    @Override
    public ViewInJobDetail selectViewInJobDetailByTaskNo(String taskNo)
    {
        return viewInJobDetailMapper.selectViewInJobDetailByTaskNo(taskNo);
    }

    /**
     * 查询入库子明细列表
     *
     * @param viewInJobDetail 入库子明细
     * @return 入库子明细
     */
    @Override
    public List<ViewInJobDetail> selectViewInJobDetailList(ViewInJobDetail viewInJobDetail)
    {
        return viewInJobDetailMapper.selectViewInJobDetailList(viewInJobDetail);
    }


    /**
     * 新增入库子明细
     *
     * @param viewInJobDetail 入库子明细
     * @return 结果
     */
    @Override
    public int insertViewInJobDetail(ViewInJobDetail viewInJobDetail)
    {
        return viewInJobDetailMapper.insertViewInJobDetail(viewInJobDetail);
    }

    /**
     * 修改入库子明细
     *
     * @param viewInJobDetail 入库子明细
     * @return 结果
     */
    @Override
    public int updateViewInJobDetail(ViewInJobDetail viewInJobDetail)
    {
        return viewInJobDetailMapper.updateViewInJobDetail(viewInJobDetail);
    }

    /**
     * 批量删除入库子明细
     *
     * @param taskNos 需要删除的入库子明细主键
     * @return 结果
     */
    @Override
    public int deleteViewInJobDetailByTaskNos(String taskNos)
    {
        return viewInJobDetailMapper.deleteViewInJobDetailByTaskNos(Convert.toStrArray(taskNos));
    }

    /**
     * 删除入库子明细信息
     *
     * @param taskNo 入库子明细主键
     * @return 结果
     */
    @Override
    public int deleteViewInJobDetailByTaskNo(String taskNo)
    {
        return viewInJobDetailMapper.deleteViewInJobDetailByTaskNo(taskNo);
    }
}
